package com.lyf.alg.practice.nju.concept;

import org.junit.Test;

/**
 * 时间复杂度分析：
 *
 *
 * @author LYF
 * @date 2022/7/2
 */
public class TimeAnalysisTests {

    // Fib --- 树结构、分支 ---  O(2^n)
    private int c1=0;

    int  recursion0(int n){
        if(n==1||n==0)
            return n;
        return recursion0(n-1)+n;
    }

    int  recursion1(int n){
        if(n==1||n==0)
            return 1;
        return recursion1(n-1)+recursion1(n-2);
    }

    @Test
    public void test1(){

    }
}
